package cn.tede.submarine;

import javax.swing.*;

/**
深水炸弹
 */
public class Bomb extends SeaObject{

    public Bomb(int x,int y){
        super(9,12,x,y,3);
    }
    public void move(){
        y += speed;//y+表示向下移动
    }
    public ImageIcon getImage(){
        return Images.bomb;
    }

    public boolean isOutOfBounds(){
        //重写，检测炸弹是否越界
        return y>=World.HEIGHT;//深水炸弹的y>=窗口的高，即为越界了
    }

}
